#include <iostream>

using namespace std;

class Base{
public:
    virtual void test(){
        cout << "Base" << endl;
    }

    virtual void test1(){
        cout << "Base1" << endl;
    }
};

class Child: public Base{
public:
    void test() final{
        cout << "Child" << endl;
    }

    void test1() override{
        cout << "Child1" << endl;
    }
};

class GrandChild: public Child{
public:
    //语法错误：不能重写final函数
    /*
    void test(){
        cout << "GrandChild" << endl;
    }
    */
    void test1() override{
        cout << "GrandChild1" << endl;
    }; 
};
int main(){


}